package day0813;

import java.util.Scanner;

/**
 * @Author:galaxy_yan
 * @Date: 2022/8/15
 * @Time: 9:19
 * @Description 斐波那契数列迭代法
 */
public class text5 {
    public static void main(String[] args) {
        int a=1;
        int b=1;
        int sum=a+b;

        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();

        if(1==n||2==n){
            System.out.println("1");
        }else if (3==n){
            System.out.println(sum);
        }else if(n>3){
            for (int i = 3; i <n ; i++) {
                a=b;
                b=sum;
                sum=a+b;
            }
            System.out.println(sum);
        }
    }

}
